package com.ibeeking.found.msg.rest.service;

import com.ibeeking.found.msg.service.common.param.MsgNoticeParam;
import com.ibeeking.found.msg.service.common.param.MsgSendParam;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ISendSmsService
 * @Description 发送短信
 * @Author ibeeking
 * @Date 2020-12-10 9:21
 **/
public interface ISendSmsService {
    /**
     * 短信通知
     *
     * @param tenantId 租户Id
     * @param templateCode
     * @param paramMap
     * @return
     */
    Boolean sendSmsTemplateMessage(Integer tenantId, String templateCode, List<String> toUser, Map<String, String> paramMap);
    /**
     * 消息通知
     *
     * @param param
     * @return
     */
    Boolean sendSmsSimpleMessage(MsgNoticeParam param);

    /**
     * 查询验证码
     *
     * @param key
     * @param mobile
     * @return
     */
    String queryVerificationCode(String key, String mobile);

    /**
     * 验证码
     *
     * @param tenantId
     * @param param
     * @return
     */
    String verificationCode(Integer tenantId, MsgSendParam param);

    /**
     * 清除验证码
     *
     * @param key
     * @param mobile
     * @return
     */
    Boolean clearVerificationCode(String key, String mobile);

    /**
     * 校验验证码
     *
     * @param key
     * @param mobile
     * @param code
     * @return
     */
    Boolean checkVerificationCode(String key, String mobile, String code);
}
